<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/17 0017
 * Time: 23:27
 */
//pcntl_signal()启动一个函数来处理一个或者多个信号

function sigint_handel($signal)
{
    print  '接收的信号' . $signal . PHP_EOL;
    exit();
}

pcntl_signal(SIGINT, 'sigint_handel');
//通过SIG_IGN 完全忽略ctrl+c
//pcntl_signal(SIGINT, SIG_IGN);
declare(ticks=1){
    while (true){
        sleep(1);
    } ;
}
//register_tick_function('foo');
//function foo(){
//    echo 111;
//};


